#ifndef SYS_H
#define SYS_H

#include "INC.h"

enum state_e {
    IDLE = 0,
    RUNNING = 1
};
typedef struct {
    bool update_flag;
    enum state_e state;
    uint8_t target_conner;
    uint8_t current_conner;
    
} sys_t;

void sys_init(void);
void set_sys_update_flag(bool flag);
bool get_sys_update_flag(void);
void switch_sys_running_state(uint8_t key);
uint8_t get_sys_running_state(void);
void set_sys_running_state(uint8_t state);
void set_sys_target_conner(uint8_t conner);
uint8_t get_sys_target_conner(void);
void set_sys_current_conner(uint8_t conner);    
uint8_t get_sys_current_conner(void);

void TIMER_SYS_INST_IRQHandler(void);
void SysTick_Handler(void);

#endif // SYS_H